package com.example.wangyuyuan.androidframe.mvp.ui.model;

import com.example.wangyuyuan.androidframe.data.httpdata.HttpData;
import com.example.wangyuyuan.androidframe.listener.OnLoadDataListListener;
import com.example.wangyuyuan.androidframe.mvp.entitry.LoginUserinfo;

import rx.Observer;

/**
 * Created by wangyuyuan on 2017/5/18.
 */

public class LoginModel {
    public void login(final OnLoadDataListListener listener, String region, String phone, String password) {
        HttpData.getInstance().login(new Observer<LoginUserinfo>() {
            @Override
            public void onCompleted() {

            }

            @Override
            public void onError(Throwable e) {
                listener.onFailure(e);
            }

            @Override
            public void onNext(LoginUserinfo loginUserinfo) {

            }


        }, region, phone, password);
    }
}
